<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "sys_role2source".
 *
 * @property int $id ID
 * @property int $roleid 角色ID
 * @property int $sourceid 资源id
 * @property string $addtime 添加时间
 */
class SysRole2source extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'sys_role2source';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['roleid', 'sourceid', 'addtime'], 'required'],
            [['roleid', 'sourceid', 'addtime'], 'integer'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'roleid' => '角色ID',
            'sourceid' => '资源id',
            'addtime' => '添加时间',
        ];
    }
}
